<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="zhangfn"
	uri="http://github.com/zhangkaitao/tags/zhang-functions"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<html>
<head>
<title></title>
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/static/css/css.css">
<script
	src="${pageContext.request.contextPath}/static/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
	function selectLang(lang) {

		window.location.href = "${pageContext.request.contextPath}//about_us/"
				+ lang;

	}
</script>
<c:set value="${pageContext.request.contextPath}" var="path1"
	scope="page" />
<!-- Bootstrap Core CSS -->
<link href="${path1}/static/css/bootstrap.min.css" rel="stylesheet">

<!-- MetisMenu CSS -->
<link href="${path1}/static/css/plugins/metisMenu/metisMenu.min.css"
	rel="stylesheet">

<!-- Custom CSS -->
<link href="${path1}/static/css/sb-admin-2.css" rel="stylesheet">

<!-- DataTables CSS -->
<link href="${path1}/static/css/plugins/dataTables.bootstrap.css"
	rel="stylesheet">

<!-- Custom Fonts -->
<link href="${path1}/static/font-awesome-4.1.0/css/font-awesome.min.css"
	rel="stylesheet" type="text/css">
</head>
<body>

	<c:if test="${not empty msg}">
		<div class="message">${msg}</div>
	</c:if>

	<div class="form-group">
		<div class="row">
			<div class="col-md-2">
				<shiro:hasPermission name="about_us:create">
					<a class="btn btn-default btn-lg"
						href="${pageContext.request.contextPath}/about_us/create">关于我们新增</a>
				</shiro:hasPermission>
			</div>
			<div class="col-md-2" style="float: right">
				<select class="form-control" onchange="selectLang(this.value);">
					<option value="zh_cn"
						<c:if test="${sessionScope.local_lang=='zh_cn'}"> selected="selected"</c:if>>简体中文</option>
					<option value="zh_hk"
						<c:if test="${sessionScope.local_lang=='zh_hk'}"> selected="selected"</c:if>>繁體中文</option>
					<option value="en"
						<c:if test="${sessionScope.local_lang=='en'}"> selected="selected"</c:if>>English</option>
				</select>

			</div>
		</div>
	</div>
	<div class="form-group"></div>

	<div class="panel panel-default">
		<div class="panel-heading"></div>
		<div class="panel-body">
			<div class="table-responsive">
				<table class="table table-striped table-bordered table-hover"
					id="dataTables-example">
					<thead>
						<tr>
							<th>名称</th>
							<th>内容</th>
							<th>备注</th>
							<th>建立时间</th>
							<th>更新时间</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${about_usList}" var="about_us">
							<tr>
								<td>${about_us.name}</td>
								<td>${about_us.content}</td>
								<td>${about_us.remark}</td>
								<td>${about_us.setup_time}</td>
								<td>${about_us.update_time}</td>
								<td><shiro:hasPermission name="about_us:update">
										<a
											href="${pageContext.request.contextPath}/about_us/${about_us.id}/update">修改</a>
									</shiro:hasPermission> <shiro:hasPermission name="about_us:delete">
										<a
											href="${pageContext.request.contextPath}/about_us/${about_us.id}/delete">删除</a>
									</shiro:hasPermission></td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
			</div>
		</div>
	</div>


	<!-- jQuery -->
	<script src="${path1}/static/js/jquery.js"></script>

	<!-- Bootstrap Core JavaScript -->
	<script src="${path1}/static/js/bootstrap.min.js"></script>

	<!-- Metis Menu Plugin JavaScript -->
	<script src="${path1}/static/js/plugins/metisMenu/metisMenu.min.js"></script>

	<!-- DataTables JavaScript -->
	<script
		src="${path1}/static/js/plugins/dataTables/jquery.dataTables.js"></script>
	<script
		src="${path1}/static/js/plugins/dataTables/dataTables.bootstrap.js"></script>

	<!-- Custom Theme JavaScript -->
	<script src="${path1}/static/js/sb-admin-2.js"></script>

	<!-- Page-Level Demo Scripts - Tables - Use for reference -->
	<script>
		$(document).ready(function() {
			$('#dataTables-example').dataTable();
		});
	</script>
</body>
</html>